package com.moyang.earn.alibabanacosdiscoveryserver2.rest;

import com.moyang.earn.alibabanacosdiscoveryserver2.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import static com.alibaba.nacos.client.config.impl.ClientWorker.log;

@RestController
@Slf4j
public class UserRest {

    @GetMapping("user/{id}")
    public User getUser(@PathVariable String id) {
        log.info("获取用户的Id:{}", id);
        User user = new User("1", "方小白");
        return user;
    }

}
